var pathNum = 0;
var editPathFlag=false;
/**初始化轨迹测点信息 */
var pathside = new Array(); //先声明一维
for (var i = 0; i < 1000; i++) {
    pathside[i] = new Array(i); //在声明二维
    for (var j = 0; j < 4; j++) {
        pathside[i][j] = "";
    }
}

function editCd(e) {
    var myDate = new Date();
    var reachTime = myDate.toLocaleString();
    if (draw == false && editCdFlag == false) {
        $(e).remove();
    } else if (draw == false && editCdFlag == true) {
        $("#cdx").val($(e).attr("cx"));
        $("#cdy").val($(e).attr("cy"));
        $("#clabelT").val($(e).attr("text"));
        $("#cNo").val($(e).attr("text1"));
    } else if (draw == true) {
        var xo = $(e).attr("cx");
        var yo = $(e).attr("cy");
        lines = lines + xo + " " + yo + " L";
        pathside[pathNum][0] = xo;
        pathside[pathNum][1] = yo;
        pathside[pathNum][2] = reachTime;
        pathside[pathNum][3] = pathNum;
        pathNum = pathNum + 1;
    }
}
function comPathDown(e){
    if(draw==true){
     var ev = $(e).attr("id");
     console.log(ev);
    }
 }

/**鼠标点击屏幕后获得点击位置的坐标 */
function getMousePos(e) {
    /** 获取点击事件*/
    var ev = e || window.event;
    var xo = ev.clientX;
    var yo = ev.clientY;
    var myDate = new Date();
    var reachTime = myDate.getTime();
    if (draw == true) {
        lines = lines + xo + " " + yo + " L";
        pathside[pathNum][0] = xo;
        pathside[pathNum][1] = yo;
        pathside[pathNum][2] = reachTime;
        pathside[pathNum][3] = pathNum;
        pathNum = pathNum + 1;
        //设置折线经过的坐标属性属性
        // objdiv[i].setAttribute("d", lines);
    } else {
        lines = "";
        alert("请点击开始绘制按钮");
    }
}

function comPathDown(e){
   if(editPathFlag==true){
    var ev = e || window.event;
    var xo = ev.clientX;
    var yo = ev.clientY;

   }
}